<template>
  <div>
    <el-dialog title="货道设置" :visible.sync="dialogFormVisible" width="1100px" @close="dialogFormH">
      <div class="nav">
        <div class="box">
          <span>货道行数:<span>10</span></span>
          <span>货道列数:<span>10</span></span>
          <span>货道容量(个):<span>10</span></span>
        </div>
        <div class="button">
          <el-button type="primary">智能排货</el-button>
        </div>
      </div>
      <el-carousel arrow="always" :autoplay="false" style="width:97%">
        <el-carousel-item v-for="items in 4" :key="items" style="overflow:scroll;">
          <el-row class="box">
            <div v-for="item in wayInfo" :key="item.channelId" class="body">
              <div class="top">
                <div class="block">
                  <el-image :src="src">
                    <div slot="error" class="image-slot">
                      <i class="el-icon-picture" />
                    </div>
                  </el-image>
                  <p>zanfsdf</p>
                  <div class="code">{{ item.channelCode }}</div>
                </div>
              </div>
              <div class="bottom">
                <el-button type="text" class="button" @click="add">添加</el-button>
                <el-button type="text" class="del">删除</el-button>
              </div>
            </div></el-row>
        </el-carousel-item>
      </el-carousel>
      <div slot="footer" class="dialog-footer">
        <el-button
          class="true"
          type="primary"
        >确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { getWayDetail } from '@/api/equipment'
export default {
  name: 'ManagementAdd',
  filters: {},
  props: {
  },
  data() {
    return {
      dialogFormVisible: false,
      src: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
      obj: {
        channelCode: null,
        currentCapacity: null,
        maxCapacity: null
      },
      wayInfo: []
    }
  },
  computed: {},
  watch: {},
  mounted() {},
  created() {

  },
  methods: {
    // 弹层显示
    dialogFormV(id) {
      this.getWayDetailInfo(id)
      this.dialogFormVisible = true
    },
    // 弹层隐藏
    dialogFormH() {
      this.dialogFormVisible = false
    },
    async getWayDetailInfo(id) {
      const data = await getWayDetail(id)
      this.wayInfo = data
    },
    // 增加
    add() {}
  }
}
</script>

<style scoped lang="scss">
::v-deep .el-dialog{
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
}
.dialog-footer{
    text-align: center;
    margin-bottom: 20px;
    .el-button{
        margin-right: 20px;
        height: 40px;
        width: 90px;
        line-height: 10px;
    }
    .cancel{
        background-color: #fbf4f0;
         border: #fbf4f0;
         color: #655b56;
    }
    .cancel:hover{
        background-color: #f3e7e1;
    }
    .true{
         background-color: #ff722c;
         border: #ff722c;
    }
    .true:hover{
        background-color: #e74d17;
    }
}
.nav{
    width: 1000px;
    height: 70px;
    background-color: #f3f6fb;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.box span{
    margin-left: 60px;
    font-weight: normal;
    span{
      margin-left: 10px;
    }
}
.button{
    margin-right: 5px;
    margin-left: 10px;
}
.bottom{
 transform: translateY(-10px);
}
.del{
  color: #ff5a5a;
}
.el-card{
    width: 143px;
    height: 177px;
}
.el-row{
    padding: 0 60px;
    margin-top: 15px;
}
.block{
  height: 125px;
  width: 100%;
  background-color: #f6f7fb;
  position: relative;
  p{
    color: #666666;
    margin-left: 43px;
    position: absolute;
    top: 90px;
    font-weight: normal;
  }
  .code{
    position: absolute;
    top: 10px;
    left: 0;
    width: 43px;
    height: 23px;
    line-height: 23px;
    background: #829bed;
    border-radius: 0 10px 10px 0;
    font-size: 12px;
    color: #fff;
    text-align: center;
    font-weight: normal;
  }
}
.block .el-image{
    height:80px;
    width: 80px;
    margin-left: 30px;
    margin-top: 15px;
    i{
        font-size: 90px;
        color: #d7dbe9;
    }
}
.box{
  display: flex;
  flex-wrap: wrap;
.body{
  width: 150px;
  height: 175px;
  margin-left: 28px;
  box-shadow: 5px 5px 8px #f4f4f4;
  .top{
    width: 150px;
    height: 135px;
    background: #f6f7fb;
  }
  .bottom{
  text-align: center;
  padding-top:10px;
  }
}
}
</style>
